package com.linxz.sdkmanager.jiguang.push.pojo;

import android.os.Bundle;

import cn.jpush.android.api.JPushInterface;

/**
 * @author Linxz
 * 创建日期：2020年03月29日 16:06
 * version：v4.5.4
 * 描述：
 */
public class JPushNotificationEvent {
    private String alert;
    private String extra;
    private int notificationId;
    private String alertType;
    private String notificationContentTitle;
    private String msgId;
    private boolean disposed=false;
    public String getAlert() {
        return alert;
    }

    public void setAlert(String alert) {
        this.alert = alert;
    }

    public String getExtra() {
        return extra;
    }

    public void setExtra(String extra) {
        this.extra = extra;
    }

    public int getNotificationId() {
        return notificationId;
    }

    public void setNotificationId(int notificationId) {
        this.notificationId = notificationId;
    }

    public String getAlertType() {
        return alertType;
    }

    public void setAlertType(String alertType) {
        this.alertType = alertType;
    }

    public String getNotificationContentTitle() {
        return notificationContentTitle;
    }

    public void setNotificationContentTitle(String notificationContentTitle) {
        this.notificationContentTitle = notificationContentTitle;
    }

    public String getMsgId() {
        return msgId;
    }

    public void setMsgId(String msgId) {
        this.msgId = msgId;
    }

    public boolean isDisposed() {
        return disposed;
    }

    public void setDisposed(boolean disposed) {
        this.disposed = disposed;
    }

    public  void bundleToEvent(Bundle bundle){
        alert=bundle.getString(JPushInterface.EXTRA_ALERT);
        extra=bundle.getString(JPushInterface.EXTRA_EXTRA);
        notificationId=bundle.getInt(JPushInterface.EXTRA_NOTIFICATION_ID);
        alertType=bundle.getString(JPushInterface.EXTRA_ALERT_TYPE);
        notificationContentTitle=bundle.getString(JPushInterface.EXTRA_NOTIFICATION_TITLE);
        msgId=bundle.getString(JPushInterface.EXTRA_MSG_ID);
    }
}
